package com.da.javatest.leetCode;

/**
 * @author chenlida
 * @date 2019/1/14 14:09
 * @description
 */
public class Code11 {
    public int maxArea(int[] height) {
        int max = 0;
        for (int i = 0; i < height.length - 1; i++) {
            for (int j = i + 1; j < height.length; j++) {
                max = Math.max(max, Math.min(height[i], height[j]) * (j - i));
            }
        }
        return max;
    }
}
